package com._520it.crm.service.impl;

import com._520it.crm.domain.CarModel;
import com._520it.crm.mapper.CarModelMapper;
import com._520it.crm.service.ICarModelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CarModelServiceImpl implements ICarModelService {
    @Autowired
    private CarModelMapper carModelMapper;
    @Override
    public int insert(CarModel record) {
        return carModelMapper.insert(record);
    }

    @Override
    public CarModel selectByPrimaryKey(Long id) {
        return carModelMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<CarModel> selectAll() {
        return carModelMapper.selectAll();
    }

    @Override
    public int updateByPrimaryKey(CarModel record) {
        return carModelMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<CarModel> selectChildByParentId(Long parentId) {

        return carModelMapper.selectChildByParentId(parentId);
    }

    @Override
    public List<CarModel> selectParent() {

        return carModelMapper.selectParent();
    }

    @Override
    public CarModel selectByCarModelName(String carModelName) {
        return carModelMapper.selectByCarModelName(carModelName);
    }
}
